<div class='project' style="border-color: <%= project.color %>;">
  <h5>
    <%= link_to project.name, project_path(project.to_param) %>
  </h5>

  <div class="">
    <%= truncate project.description, :length => 100 %>
  </div>

  <small>
    <% if project.is_removed? %>
      <%= fa_icon('exclamation-triangle') %> This package is no longer available on <%= project.platform %>
    <% elsif project.is_deprecated? %>
      <%= fa_icon('exclamation-triangle') %> This package is deprecated -
      <%= project.versions_count > 1 ? 'Updated' : 'Published' %>
      <%= timeago_tag project.latest_release_published_at %>
    <% elsif project.is_unmaintained? %>
      <%= fa_icon('exclamation-triangle') %> This package is no longer maintained -
      <%= project.versions_count > 1 ? 'Updated' : 'Published' %>
      <%= timeago_tag project.latest_release_published_at %>
    <% else %>
      Latest release <%= project.latest_release_number %> -
      <%= project.versions_count > 1 ? 'Updated' : 'Published' %>
      <%= timeago_tag project.latest_release_published_at %>
      <br>
      <% if project.stars > 0 %>
        <%= number_to_human project.stars %> stars
      <% end %>
      - Used by <%= @counts[project.id] %> org repos (<%= number_to_percentage @counts[project.id]/@user.repositories.count.to_f*100 %>)
    <% end %>
  </small>
</div>
